package shortlink.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import shortlink.dao.entity.ShortLinkDO;
import shortlink.dto.biz.ShortLinkStatsRecordDTO;
import shortlink.dto.req.ShortLinkBatchCreateReqDTO;
import shortlink.dto.req.ShortLinkCreateReqDTO;
import shortlink.dto.req.ShortLinkPageReqDTO;
import shortlink.dto.req.ShortLinkUpdateReqDTO;
import shortlink.dto.resp.ShortLinkBatchCreateRespDTO;
import shortlink.dto.resp.ShortLinkCreateRespDTO;
import shortlink.dto.resp.ShortLinkGroupCountQueryRespDTO;
import shortlink.dto.resp.ShortLinkPageRespDTO;

import java.io.IOException;
import java.util.List;

public interface ShortLinkService extends IService<ShortLinkDO>{
    ShortLinkCreateRespDTO createShortLink(ShortLinkCreateReqDTO requestParam);

    ShortLinkBatchCreateRespDTO batchcreateShortLink(ShortLinkBatchCreateReqDTO requestParam);

    void updateShortLink(ShortLinkUpdateReqDTO requestParam);

    IPage<ShortLinkPageRespDTO> pageshortlink(ShortLinkPageReqDTO requestParam);

    List<ShortLinkGroupCountQueryRespDTO> groupshortlink(List<String> requestParam);

    void restoreUrl(String shortUri, ServletRequest request, ServletResponse response) throws IOException;
    /*短链接统计实体信息*/
    void shortLinkStats(ShortLinkStatsRecordDTO shortLinkStatsRecord);
}
